import allure
from page_object.page_roncoo_pay_login import PageLogin
from page_element.el_Roncoo import *
from utils.timer import sleep
import logging

class AddUser(PageLogin):
    def adduser(self,username,phone,password):
        self.page_login('admin','123456')
        with allure.step('点击用户管理'):
            self.click(adduser.user_manage)
        with allure.step('点击用户信息'):
            self.click(adduser.user_info)
        with allure.step('点击添加用户'):
            self.click(adduser.add_user_btn)
        with allure.step(f'输入用户名称：{username}'):
            self.send_keys(adduser.username_inp,username)
        with allure.step(f'输入手机号：{phone}'):
            self.send_keys(adduser.userphone_inp,phone)
        with allure.step(f'输入登录密码：{password}'):
            self.send_keys(adduser.userpassword_inp,password)
        with allure.step('点击提交'):
            self.click(adduser.tj_btn)